<!DOCTYPE html>
<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>米行域名批量交易个人中心</title>

<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">

<include file="./Public/public/public.html" />

<script>
$(document).ready(function(){
    //点击弹出绑定弹窗
  $('[action="bind"]').click(function(){
    $("form").QvalidateDestory();
    $('form').find('input[type=text],input[type=tel]').each(function(i){$(this).val('')});
    $('[popup="bind"]').reveal();
  });
  $("#showMobile").find("input").removeAttr("valid");
  //切换注册商时选择验证方式
  $('#registrarName').change(function(){
    if($("#"+$(this).attr("id")).find("option:selected").attr("check")== 1 ){
       //验证邮箱
       $("#email").attr("valid","{'required':true,'email':true}");
        $("#imgcodeEmail").attr("valid","{'required':true}");
        $("#codeEmail").attr("valid","{required:true,number:true,limitLength:6}");
       document.getElementById("showEmail").style.display="block";
       document.getElementById("showMobile").style.display="none";
       $("#showMobile").find("input").removeAttr("valid");
    }else{
       //验证手机
        $("#mobile").attr("valid",'{"required":true,"cellphone":true}');
        $("#imgcodeMobile").attr("valid","{'required':true}");
        $("#codeMobile").attr("valid","{required:true,number:true,limitLength:6}");
        document.getElementById("showMobile").style.display="block";
        document.getElementById("showEmail").style.display="none";
        $("#showEmail").find("input").removeAttr("valid");
    };
  });
  //点击确认
  $('[action="confirm"]').click(function(){
     $(this).parents('form').Qsubmit();
  }); 


});
</script>

</head>
<body>
<!--pc头部-->
<include file="./Public/public/top.html" />
<!--pc头部结束-->


<!--mobile头部-->
<include file="./Public/public/mobileTop.html" />
<!--mobile头部结束-->
<div class="layout-wrap">
    <!--已审核-->
    <div class="layout">
      <include file="./Public/public/centerLeft.html" />
   
<!--  绑定 -->
	<div popup="bind" class="reveal-modal medium">
  <a class="close-reveal-modal" action="closeModal">×</a>
    <h3 id="popupTitle">添加注册商ID</h3>
    <div>
    <form id="addRegistrar" method="post" action="{:U('Regbusiness/save')}" onsubmit="return false;">
    	<input type="hidden" id="sendMobileUrl" value="{:U('Regbusiness/sendMobileMes')}" >
 	    <input type="hidden" id="sendEmailUrl" value="{:U('Regbusiness/sendEmailMes')}" >
	    <div class="form-row form-row-s mt20">
	        <div class="input-name w30" id="fieldName">选择注册商</div>
	        <div class="input-box w65">
		        <select name="businesid" valid="{'required':true}" 
		        	msg="{'required':'注册商不能为空'}" id="registrarName"> 
		        </select> 
	        </div>
	        <script>
				$(function(){
					$.ajax({
	                    url:"{:U('Regbusiness/gePlatRegbusiness')}",
	                    type:"GET",
	                    success:function(resp){
	                    	var html;
	                    	$.each(resp,function(n,value) {
	                    		html=html+"<option value='"+value.id+"' check='"+value.check+"'>"+value.name+"</option>";
	                         });
	                    	$("#registrarName").html(html);
	                    }
	                }).fail(function(){
	                    isSigning = false;
	                });
				})
			</script>
	        <div class="clr"></div>
	    </div>   
	    <div class="form-row form-row-s ">
	        <div class="input-name w30" id="fieldName">我的注册商ID</div>
	        <div class="input-box w65">
	        <input type="text" name="busicode" class="input-s" 
		        id="inputName" placeholder="push域名时需要" valid="{'required':true}" 
		        msg="{'required':'注册商ID不能为空'}">
	        </div>
	        <div class="clr"></div>
	    </div>
	       <div id="showMobile" style="display:none">
		    <div class="form-row form-row-s ">
		          <div class="input-name w30" id="target_label">我在注册商那的手机</div>
		          <div class="input-box w65">
		          <input type="hidden" id="mobRegImgCodeId" value="1" />
		          <input type="tel" id="mobile" name="mobile" 
		          class="input-s" placeholder="注册手机，push域名时核对身份" 
		          valid='{"required":true,"cellphone":true}' 
		          msg='{"required":"请填写手机","cellphone":"手机格式不正确"}'>
		          </div>
		          <div class="clr"></div>
		      </div>
		      <div class="form-row form-row-s">
		          <div class="input-name w30" id="fieldName">图形验证码</div>
		          <div class="input-box w30">
		           <input id="imgcodeMobile" name="imgcodeMobile" type="text" 
		           valid="{'required':true}" msg="{'required':'请填写图形验证码'}" 
		           class="input-s" placeholder="图形验证码">
		          </div>
		          <div class="input-name-even w40" style="overflow:hidden; height:28px;">
		          		<img  prop="verifyImg" name="img" id="mobileImage"
						src="{:U('Register/regverifyCode','type=1')}" class="code imgCodeCl"
						style="cursor: pointer; margin: -5px 0px -5px 0px">
		          </div>
		          <div class="clr"></div>
		      </div>  
	          <div class="form-row form-row-s ">
		          <div id="verifyLabel" class="input-name w30" >手机验证码</div>
		          <div class="input-box w30">
		            <input id="codeMobile" name="codeMobile" type="text"
					valid="{required:true,number:true,limitLength:6}"
					msg="{required:'请填写6位数字手机验证码',number:'请填写6位数字手机验证码',limitLength:'请填写6位数字手机验证码'}"
					class="input-s" placeholder="手机验证码">
		          </div>
		          <div class="input-name-even w40">
		          		<div id="sendMObileMess" watch="mobile" name="register"
						method="email" emsg="请输入正确的手机号"
						token="12ad2b693c60403ad9169f6c5f4bc042" left="0"
						class="timer w100">获取手机验证码</div>
		          </div>
		          <div class="clr"></div>
	        </div>
	    </div> 
	    <div id="showEmail" style="display:block">
		    <div class="form-row form-row-s ">
		          <div class="input-name w30" id="target_label">我在注册商那的邮箱</div>
		          <div class="input-box w65">
		          <input type="hidden"  id="emlRegImgCodeId" value="2" />
		          <input type="text" id="email" name="email" 
		          class="input-s" placeholder="注册邮箱，push域名时核对身份" 
		          valid="{'required':true,'email':true}" 
		          msg="{'required':'请填写邮箱','email':'邮箱格式不正确'}">
		          </div>
		          <div class="clr"></div>
		      </div>
		      <div class="form-row form-row-s">
		          <div class="input-name w30" id="fieldName">图形验证码</div>
		          <div class="input-box w30">
		           <input id="imgcodeEmail" name="imgcodeEmail" type="text" 
		           valid="{'required':true}" msg="{'required':'请填写图形验证码'}" 
		           class="input-s" placeholder="图形验证码">
		          </div>
		          <div class="input-name-even w40" style="overflow:hidden; height:28px;">
		          		<img  prop="verifyImg" name="img" id="emailImage"
						src="{:U('Register/regverifyCode','type=2')}" class="code imgCodeCl"
						style="cursor: pointer; margin: -5px 0px -5px 0px">
		          </div>
		          <div class="clr"></div>
		      </div>  
	          <div class="form-row form-row-s ">
		          <div id="verifyLabel" class="input-name w30" >邮箱验证码</div>
		          <div class="input-box w30">
		            <input id="codeEmail" name="codeEmail" type="text"
					valid="{required:true,number:true,limitLength:6}"
					msg="{required:'请填写6位数字邮箱验证码',number:'请填写6位数字邮箱验证码',limitLength:'请填写6位数字邮箱验证码'}"
					class="input-s" placeholder="邮箱验证码">
		          </div>
		          <div class="input-name-even w40">
		          		<div id="sendEmailMess" watch="email" name="register"
						method="email" emsg="请输入正确的邮箱地址"
						token="12ad2b693c60403ad9169f6c5f4bc042" left="0"
						class="timer w100">获取邮箱验证码</div>
		          </div>
		          <div class="clr"></div>
	        </div>
	    </div>
    <div class="split-dot mb20 mt20 text-center"></div>
    <div class="form-row form-row-s">
        <input type="button" action="confirm" class=" button button-blue w45 fl" value="确认">
        <input type="button" action="cancel" class=" button button-gray w45 fr" value="取消">

        <div class="clr"></div>
    </div>
    </form>
  </div>   
</div>
      <div class="right" style="min-height: 882px;">
           
                <h3>域名注册商账号</h3>
                <div class="cnt-tips">
                  <p>温馨提示：根据域名所在的注册商不同，需要您添加拥有的注册商ID，以便与平台进行push。可以添加多个，添加后不可删除！</p>
                </div>   
                <div class="split-dot mt10 mb10"></div>
                <volist name="list" id="vo">
	                <div class="row">
	                  <div class="key w55">
		                  <i class="fa fa-exchange"></i>{$vo.business.name}ID：{$vo.busicode}</div>
		                  <div class="value w30">
		                  <a class="locked">已绑定</a>
	                  </div>
	                  <div class="clr"> </div>
	                </div>
            	</volist>
                  <div class="row" action="bind" popuptitle="添加注册商帐号" 
                  valid="{'required':true}"
                   msg="{'required':''}">
                  <div class="key w55"><i class="fa fa-plus-square"></i>添加注册商ID</div>
                  <div class="value w30">
                    <a>添加</a>
                  </div>
                  <div class="clr"> </div>
                </div>
                         
        </div>
        <div class="clr"></div>
    </div>
</div>
<include file="./Public/public/footer.html" />
<script type="text/javascript" src="{$app_path}{$static_path}/js/common.js"></script>
</body></html>